package com.rest.core.config;

import javax.ws.rs.ApplicationPath;

import org.glassfish.jersey.jackson.JacksonFeature;
import org.glassfish.jersey.server.ResourceConfig;

import com.rest.core.filter.AirLogFilter;
import com.rest.core.filter.AuthRequestFilter;
import com.rest.core.mapper.BaseExceptionMapper;


@ApplicationPath("/api/*")
public class AirResourceConfig extends ResourceConfig {
	public AirResourceConfig() {
		packages("com.rest.api");
		// 注解JSON转换器
//		register(JacksonJsonProvider.class);
		// 注解异常
		register(BaseExceptionMapper.class);
		// 记录请求日志
		register(AuthRequestFilter.class);
		// 权限验证
		register(AirLogFilter.class);
		
		register(JacksonFeature.class);
	}
}